CREATE TABLE [dbo].[TDCORR_FINA]
(
[CO_EMPR] [dbo].[TD_VC_002] NOT NULL,
[TI_DOCU] [dbo].[TD_VC_003] NOT NULL,
[NU_SERI] [dbo].[TD_VC_010] NOT NULL,
[ST_GENE_DOCU] [dbo].[TD_VC_001_SINO] NOT NULL CONSTRAINT [DF__TDCORR_FI__ST_GE__4D7F7902] DEFAULT ('N'),
[NU_ULTI_CORR] [dbo].[TD_IN_001] NOT NULL CONSTRAINT [DF__TDCORR_FI__NU_UL__4F67C174] DEFAULT ((0)),
[NU_LINE] [dbo].[TD_IN_001] NOT NULL CONSTRAINT [DF__TDCORR_FI__NU_LI__505BE5AD] DEFAULT ((0)),
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TDCORR_FI__CO_US__515009E6] DEFAULT (suser_sname()),
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TDCORR_FI__FE_US__52442E1F] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TDCORR_FI__CO_US__53385258] DEFAULT (suser_sname()),
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TDCORR_FI__FE_US__542C7691] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TDCORR_FINA] WITH NOCHECK ADD CONSTRAINT [CK__TDCORR_FI__ST_GE__4E739D3B] CHECK NOT FOR REPLICATION (([ST_GENE_DOCU]='N' OR [ST_GENE_DOCU]='S'))
GO
ALTER TABLE [dbo].[TDCORR_FINA] ADD CONSTRAINT [PK__TDCORR_F__4C45286532574CD1] PRIMARY KEY CLUSTERED  ([CO_EMPR], [TI_DOCU], [NU_SERI]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TDCORR_FINA] ADD CONSTRAINT [FK__TDCORR_FINA__3F9C3956] FOREIGN KEY ([CO_EMPR], [TI_DOCU]) REFERENCES [dbo].[TTCORR_FINA] ([CO_EMPR], [TI_DOCU])
GO
